<link rel="stylesheet" href="/libs/layui/css/layui.css">
<script src="/libs/layui/layui.all.js"></script>
<div>
    <table class="layui-hide" id="villageSelect" lay-filter="demo"></table>
</div>
<script>
    //执行一个 table 实例
    layui.table.render({
        elem: '#villageSelect',
        height: 300,
        url: '/demo/table/user/', //数据接口
        page: true, //开启分页
        cols: [[ //表头
            {field: 'id', title: 'ID', width: 80, sort: true, fixed: 'left'},
            {field: 'username', title: '企业名称', width: 80},
            {field: 'sex', title: '企业法人', width: 80, sort: true}
        ]]
    });
</script>